package com.gxa.autoparts.admin.service.impl;

import com.gxa.autoparts.admin.mapper.OrderItemMapper;
import com.gxa.autoparts.admin.service.OrderItemService;
import com.gxa.autoparts.core.pojo.OrderItem;
import com.gxa.autoparts.core.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author R
 * @data 2022-01-10 17:35
 */
@Service
public class OrderItemServiceImpl extends BaseServiceImpl<OrderItem> implements OrderItemService {

    @Autowired
    OrderItemMapper orderItemMapper;

    @Override
    public List<Map<String, Object>> getItemCount(Long orderId) {
        return orderItemMapper.getItemCount(orderId);
    }

    @Override
    public void deleteOrderItem(Long orderId) {
        orderItemMapper.deleteOrderItem(orderId);
    }
}
